﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using MiragePWF.NH.Validation;
using Wolfut.MirageEE.Kernal.Common;
using Wolfut.MirageEE.Domain.CommonUtilities;

namespace Wolfut.MirageEE.Domain.Procurement
{
    /// <summary>
    /// 用户操作日志
    /// </summary>
    /// <remarks>
    /// Author: Bruce
    /// Date: 2009-03-14
    /// </remarks>
    [ActiveRecord("OPERATION_LOGS")]
    public class OperationLog : PersistentObjectWithGuid
    {
        #region 用户ID
        private string userID = string.Empty;
        /// <summary>
        /// 用户ID
        /// </summary>
        [Property("USER_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "退货单编号超长！")]
        public virtual  string UserID
        {
            get { return userID; }
            set { userID = value; }
        }
        #endregion

        #region 模块名
        private string module = string.Empty;

        /// <summary>
        /// 模块名
        /// </summary>
        [Property("MODULE")]
        [ValidateLength(0, 50, "模块名超长")]
        public virtual  string Module
        {
            get { return module; }
            set { module = value; }
        }
        #endregion        

        #region 日期
        private DateTime operateDate;
        /// <summary>
        /// 日期
        /// </summary>
        [Property("OPERATION_DATE")]
        public virtual  DateTime OperateDate
        {
            get { return operateDate; }
            set { operateDate = value; }
        }
        #endregion

        #region 操作类型
        private int operationType;

        /// <summary>
        /// 操作类型
        /// </summary>
        [Property("OPERATION_TYPE")]
        public virtual int OperationType
        {
            get
            {
                return operationType;
            }
            set
            {
                operationType = value;
            }
        }
        #endregion

        #region 操作内容
        private string operationContent = string.Empty;

        /// <summary>
        /// 操作内容
        /// </summary>
        [Property("OPERATION_CONTENT")]
        [ValidateLength(0, 1000, "操作内容 超长！")]
        public virtual string OperationContent
        {
            get
            {
                return operationContent;
            }
            set
            {
                operationContent = value;
            }
        }
        #endregion      
    }
}
